Optimal. Leaf size=31 \[ -\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (1+x^2\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {1121, 632, 212}
\begin {gather*} -\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (x^2+1\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 1121
Rubi steps
\begin {align*} \int \frac {x}{a-b+2 a x^2+a x^4} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {1}{a-b+2 a x+a x^2} \, dx,x,x^2\right )\\ &=-\text {Subst}\left (\int \frac {1}{4 a b-x^2} \, dx,x,2 a \left (1+x^2\right )\right )\\ &=-\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (1+x^2\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 31, normalized size = 1.00 \begin {gather*} -\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (1+x^2\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 26, normalized size = 0.84
method | result | size |
default | \(-\frac {\arctanh \left (\frac {2 a \,x^{2}+2 a}{2 \sqrt {a b}}\right )}{2 \sqrt {a b}}\) | \(26\) |
risch | \(\frac {\ln \left (\left (\sqrt {a b}+a \right ) x^{2}+a -b \right )}{4 \sqrt {a b}}-\frac {\ln \left (\left (\sqrt {a b}-a \right ) x^{2}-a +b \right )}{4 \sqrt {a b}}\) | \(52\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 37, normalized size = 1.19 \begin {gather*} \frac {\log \left (\frac {a x^{2} + a - \sqrt {a b}}{a x^{2} + a + \sqrt {a b}}\right )}{4 \, \sqrt {a b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 91, normalized size = 2.94 \begin {gather*} \left [\frac {\sqrt {a b} \log \left (\frac {a x^{4} + 2 \, a x^{2} - 2 \, \sqrt {a b} {\left (x^{2} + 1\right )} + a + b}{a x^{4} + 2 \, a x^{2} + a - b}\right )}{4 \, a b}, \frac {\sqrt {-a b} \arctan \left (\frac {\sqrt {-a b}}{a x^{2} + a}\right )}{2 \, a b}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.15, size = 53, normalized size = 1.71 \begin {gather*} \frac {\sqrt {\frac {1}{a b}} \log {\left (- b \sqrt {\frac {1}{a b}} + x^{2} + 1 \right )}}{4} - \frac {\sqrt {\frac {1}{a b}} \log {\left (b \sqrt {\frac {1}{a b}} + x^{2} + 1 \right )}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.42, size = 23, normalized size = 0.74 \begin {gather*} \frac {\arctan \left (\frac {a x^{2} + a}{\sqrt {-a b}}\right )}{2 \, \sqrt {-a b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.34, size = 31, normalized size = 1.00 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {\sqrt {a}\,\sqrt {b}\,x^2}{a\,x^2+a-b}\right )}{2\,\sqrt {a}\,\sqrt {b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________